<?php
// +----------------------------------------------------------------------
// | ManniuRead
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://manniuyun.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: heitao <read@manniuyun.com>
// +----------------------------------------------------------------------

namespace app\admin\validate;

use think\Validate;

class AdminMenu extends Validate{

    protected $rule = [
        'name'      => ['require'],
        'module'    => ['require'],
        'class'     => ['require'],
        'method'    => ['require','alphaDash'],
    ];

    protected $message  =   [
        'name.require'  	=> '菜单名称不能为空',

        'module.require'     => '模块不能为空',

        'class.require'      => '控制器不能为空',

        'method.require'     => '方法不能为空',
        'method.alphaDash'  => '方法名只能是字母和数字，下划线_及破折号-',
    ];

    protected $scene = [
        'nourl'   => ['name'],
    ];
}